\documentclass[11pt]{article}
\usepackage{geometry}
\geometry{letterpaper}
\usepackage[parfill]{parskip}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}

\title{CMSI 488 Assignment Three}
\author{Matt Kronk, Andrew Forney, and David Hara (Team MAD)}
\date{\today}
\begin{document}
\maketitle
\begin{center}
\emph{Find the source code at:} \\ http://code.google.com/p/lmu-cmsi-forney/source/browse/ 
\begin{verbatim}












\end{verbatim}
\end{center}
\textbf{Bonus:} \\
\newline David +1 (3/24/11: Caught type mismatch on ROFLKODE signature) \\
\newline Andrew +2 (3/24/11: Incorrect ROFLKODE return type; 4/5/11: Forgot line breaks in lex. analysis)

\newpage
\section{success-tests-one.rk}
\begin{verbatim}


BTW DIS ARE WEAR DA STUFFZ START
HAI

CAN HAS maffz? BTW NO MAFFZ FOR JOO


BTW Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q)
BTW VARDEC TESTS LOL

I HAS A INT intTest ITZ 5
I HAS A NUMBR numbrTest ITZ 7.0
I HAS A YARN yarnTest ITZ "test"
I HAS A B00L boolTest ITZ WIN
I HAS A KAR karTest ITZ 'c' BTW FOR CAT LOL

I HAS A intThing ITZ 6
I HAS A numbrThing ITZ 9.2
I HAS A yarnThing ITZ "test"
I HAS A boolThing ITZ WIN
I HAS A karThing ITZ '!'

I HAS A INT i
I HAS A NUMBR n
I HAS A YARN y
I HAS A B00L b
I HAS A KAR k

I HAS A YARN LIST yarnListTest ITZ [: "test" "one" "CAT!" :]
I HAS A INT LIST intListTest ITZ [: 7 8 9 :] BTW WHY 9 AFRAID OF 7

I HAS A yarnListThing ITZ [: "test" "one" "CAT!" :]
I HAS A intListThing ITZ [: 7 8 9 :] BTW WHY 9 AFRAID OF 7
BTW DIS FAILZ: intListThing !?0?! R 0

I HAS A YARN LIST yl
I HAS A INT LIST il

I HAS A FOREVERFIVE ITZ 4EVER 5
I HAS A FOREVERJIVE ITZ 4EVER "JIVE"


BTW Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q)
BTW BUKKIT TEST

TEH BUKKIT UV
  YARN arang
  INT blah
AKA BANGARANG

BTW DESE SUX BUT DEY SHOULDNT
BTW  I HAS A bang ITZ BANGARANG <: "a bangarang!" 5 :>
BTW  YO bang!!!arang
BTW  UPZORZ bang!!!blah


BTW Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q)
BTW SIMPLE STATEMENT TESTS

YO "THIS ARE A TEST YO!"
UPZORZ intTest
NERFZORZ intTest
numbrTest R 5.9


BTW Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q)
BTW MODIFIER TESTS

boolTest R WIN IF numbrTest PWNS intTest
boolTest R FAIL CEPT IF numbrTest PWNED BY OR SAEM AS intTest

UPZORZ intTest WHIEL intTest PWNED BY numbrTest
DIAF "JOO SUX" TIL intTest SAEM AS numbrTest BTW LOL

NERFZORZ intTest IF intTest PWNS OR SAEM AS numbrTest
DIAF "N00B" IF yarnTest SAEM AS N00B

BTW DIVIDZ FAIL: UPZORZ intTest IF intTest DIVIDZ 5


BTW Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q)
BTW CONDITIONAL TEST

karTest SAEM AS yarnTest !? 0 ?!?
WERD
  YO "JOO WINZ"
OIC

yarnTest !?0?! SAEM AS yarnTest !? 1 ?!?
WERD
  YO "JOO WINZ"
  YO "JOO WINZ MOER"
MEBBE yarnTest !?0?! SAEM AS karTest
  UPZORZ intTest
  NERFZORZ intTest BTW NO UPZ FOR JOO
MEBBE FAIL
  YO "HOW I GET HERE?!!?!???!"
OIC

numbrTest PWNS intTest?
WERD
  DIAF "UBERN00B"
MEBBE WIN
  DIAF "STILLN00B"
NO WAI
  DIAF "BAI"
OIC


BTW Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q)
BTW SWITCH TEST

BTW CASES NOT CAUGHT UNDER SYNTAXZ
karTest WTF?
  OMG 'a', YO "A WASSUP?", YO "A FOR APPLE", intTest R 5
  OMG 'b', YO "B KARFUL"
  OMG 'c', YO "NAO I C!", UPZORZ intTest
  OMGWTF, YO "IF YOU NOT A B C, YO NOT NOTHING."
OIC


BTW Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q)
BTW LOOPZ TEST

I HAS A you ITZ "you"
I HAS A home ITZ "THAT!"
I HAS A food ITZ 10
I HAS A dusk ITZ 600
I HAS A dawn ITZ 1800

IM IN UR house TIL you SAEM AS home
  YO "ANYONE HOME?"
  you R you ~~ home
  GTFO house IF food PWNED BY 0
  HWGA house BTW HA!
LOL

BTW DESE ARE REALLY FUNNY
IM IN UR kitchen NERFIN food FROM dusk TO dawn
  YO "OMNOMNOMNOM"
  YO "OMOMOMOMOMOMOMOONONONONOMOMONOM"
  YO "ATE TOO MUCH"
LOL

IM IN UR room UPPIN you THRU dusk
  YO "OMNOMNOMNOM"
  YO "OMOMOMOMOMOMOMOONONONONOMOMONOM"
  YO "ATE TOO MUCH"
LOL


BTW Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q)
BTW TRY CATCH TEST

PLZ intListTest !? 1000 ?! R 5
AWSUM THX
  YO "DAT WERKED? NO WAI!"
  YO "OK BAI"
O NOES
  intListTest !?0 ?! R 0
  YO "HOKAY" IF intListTest !?0?! SAEM AS 0
MKAY


BTW Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q)
BTW NAP AND EXCEPSHUN TEST

BRB 500 BTW (v_v)
FACEPALM "ONE YARN" "TWO YARNS"

KTHXBYE
\end{verbatim}

\section{success-maff-tests.rk}
\begin{verbatim}
HAI


BTW Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q)
BTW FUNCTION DECLARATION TEST

I CAN MAEK INT testIntFunc
  HEREZ UR 5
SRSLY

I CAN MAEK B00L testBoolFunc WIF UR INT x
  HEREZ UR x PWNS 5
SRSLY

I CAN MAEK INT x WIF UR INT y
  HEREZ UR y
SRSLY

I HAS A INT y ITZ x (: 5 :)
YO "WERKS" IF testBoolFunc (: 3 :)

BTW y R testIntFunc (::)
BTW NO PARAM FUNCTION CALL NO WORKIE

BTW VOID FUNCTIONS NO WORKIE

BTW I CAN testFunc
BTW   YO "IM A FUNCTION!!"
BTW SRSLY

BTW I CAN testMultiFunc WIF UR YARN x AN YARN y AN B00L z
BTW   YO x ~~ y IF z
BTW SRSLY

BTW testFunc (::)
BTW testMultiFunc (: "Hello" ", world" WIN :)


BTW Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q)
BTW BINARY EXPRESSION TEST

YO "OR STATEMENT" IF WIN ORELSE FAIL BTW SHOULD PRINT
YO "AND STATEMENT" IF WIN ANALSO FAIL BTW DUN PRINT
YO 5 BITOR 4
YO 7 BITXOR 8
YO 9 BITAND 1
YO 2 BITZLEFT 3
YO 4 BITZRIGHT 12384976
YO 4 UP 8
YO 3.7 NERF 2.0
YO "wooooooooo" ~~ "oooooooooooooo" BTW BREATH LOL
YO 3.8 TIEMZ 10.0
YO 8 OVR 4
YO 27 LEFTOVR 4
YO 23 UP (24 UP 21)

BTW Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q) Q(^_^Q)
BTW UNARY EXPRESSION TEST

YO NAA WIN
YO BITZFLIP 8
YO SIEZ UV "LOOOOOOOONG STRING LOTSA SIEZ UV"
YO B00LZOR N00B
YO INTZOR 'c'
BTW YO NUMZOR 4
YO KARZOR 69
YO YARNZOR WIN


KTHXBYE
\end{verbatim}

\section{synerror-var-dec.rk}
\begin{verbatim}
BTW STUPIDZ INITZ

HAI
  I HAS A x ITZ A y ITZ "hi"
KTHXBYE
\end{verbatim}

\section{synerror-nohai.rk}
\begin{verbatim}
YO "hullo werld"
KTHXBYE
\end{verbatim}

\section{synerror-nice-try.rk}
\begin{verbatim}
BTW NICE TRY... NAWT!

HAI

I HAS A INT x ITZ 5

PLZ x
AWSUM THX
  YO "GEWD"
O NOES
  YO "BAWD"
MKAY

KTHXBYE
\end{verbatim}

\section{synerror-badhas.rk}
\begin{verbatim}
HAI
I HAGIUGIUS A x
KTHXBYE
\end{verbatim}

\section{synerror-bad-switch.rk}
\begin{verbatim}
BTW WHERE DA OMGWTF?!

HAI

I HAS A KAR karTest ITZ 'k'

karTest WTF?
  OMG 'a', YO "A WASSUP?", YO "A FOR APPLE"
  OMG 'b', YO "B KARFUL"
  OMG 'c', YO "NAO I C!"
OIC

KTHXBYE
\end{verbatim}

\section{synerror-bad-modifier.rk}
\begin{verbatim}
BTW STUPID MODIFIER

HAI
  I HAS A INT x ITZ 5
  I HAS A INT y ITZ 6
  IF x SAEM AS y UPZORZ x
KTHXBYE
\end{verbatim}

\section{synerror-bad-loops.rk}
\begin{verbatim}
BTW STUPID LEWPZ

HAI
  I HAS A INT x ITZ 5

  IM IN UR loop TIL x THRU 7
    YO "GOTCHA!"
  LOL
KTHXBYE
\end{verbatim}

\section{synerror-bad-list-notation.rk}
\begin{verbatim}
BTW STUPIDZ INITZ

HAI
  I HAS A YARN LIST y ITZ <: "one" "two" "three" :>
KTHXBYE
\end{verbatim}

\section{synerror-bad-funcdec.rk}
\begin{verbatim}
BTW BAAAAD FUNCDEC

HAI

I CAN INT testFunc WIF UR INT y AN INT x
  YO "HA!"
  HEREZ UR x
SRSLY

KTHXBYE
\end{verbatim}

\section{synerror-bad-bukkit.rk}
\begin{verbatim}
BTW STUPIDZ INITZ

HAI
  I HAS A BUKKIT UV
    YARN erang
  AKA bang
KTHXBYE
\end{verbatim}

\section{semerror-bool-no-zeroes.rk}
\begin{verbatim}
BTW SUX AT ZEROES

HAI
  I HAS A BOOL x ITZ WIN
KTHXBYE
\end{verbatim}

\section{semerror-bukkit-field-ref.rk}
\begin{verbatim}
HAI

TEH BUKKIT UV
  INT x
  TEST x
AKA TEST

KTHXBYE
\end{verbatim}

\section{semerror-bukkit-null-pointer.rk}
\begin{verbatim}
HAI

TEH BUKKIT UV
  INT x
  YARN y
AKA TEST

I HAS A z ITZ TEST <: 5 "hi" :>
YO z!!!bam

KTHXBYE
\end{verbatim}

\section{semerror-fundec-placeholder.rk}
\begin{verbatim}
HAI

THEM CAN MAEK INT x WIF UR INT y

x (: 5 :)

KTHXBYE
\end{verbatim}

\section{semerror-incompatible-types.rk}
\begin{verbatim}
HAI

I HAS A INT x ITZ 5
I HAS A YARN y ITZ "BAD!"

x R y

KTHXBYE
\end{verbatim}

\section{semerror-invalid-init-type.rk}
\begin{verbatim}
HAI

I HAS A INT x ITZ "BAD!"

KTHXBYE
\end{verbatim}

\section{semerror-modify-final.rk}
\begin{verbatim}
HAI

I HAS A INT x ITZ 4EVER 4

UPZORZ x

KTHXBYE
\end{verbatim}

\section{semerror-var-redeclared.rk}
\begin{verbatim}
HAI
I HAS A x ITZ 4
I HAS A YARN x
KTHXBYE
\end{verbatim}

\section{semerror-varname-same-funcparam.rk}
\begin{verbatim}
HAI

I CAN MAEK INT y WIF UR INT x
  I HAS A INT x ITZ 4
  HEREZ UR x
SRSLY

KTHXBYE
\end{verbatim}

\section{semerror-varref-predec.rk}
\begin{verbatim}
HAI

I HAS A INT x ITZ 4

IM IN UR house TIL x SAEM AS 3
  IM IN UR house TIL x SAEM AS 2
    YO "HI!"
  LOL
LOL

KTHXBYE
\end{verbatim}

\section{semerror-wrong-arg-type.rk}
\begin{verbatim}
HAI

I CAN MAEK INT y WIF UR INT x
  HEREZ UR 5
SRSLY

YO y (: "HAHA!" :)

KTHXBYE
\end{verbatim}

\section{semerror-wrong-arity.rk}
\begin{verbatim}
HAI

I HAS A INT y ITZ 5

I CAN MAEK INT x WIF UR INT y
  HEREZ UR y
SRSLY

y R x (: :)

KTHXBYE
\end{verbatim}

\section{semerror-wrong-index-access-type.rk}
\begin{verbatim}
HAI

I HAS A INT LIST x ITZ [: 1 2 3 :]

YO x!? "ILL TAKE 1 PLZ" ?!

KTHXBYE
\end{verbatim}

\end{document}